#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <arpa/inet.h>

int main() 
{
	char str[30],*new;
	int m;

	//helloworld	6
	scanf("%s",str);
	while(getchar() != '\n');
	scanf("%d",&m);
	new = &str[m-1];
	
	printf("%s\n",new);
	
	return 0;
}

